package com.yilin.medical.activity;

import java.util.ArrayList;
import java.util.List;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

import com.yilin.medical.R;
import com.yilin.medical.adapter.GuoJiGuoNeiZhuanZhenAdapter2;
import com.yilin.medical.model.GuoJiGuoNeiZhuanZhenBean2;

/**
 * 坑爹的设计,硬高出了一个二级的列表页面,牛逼啊,所以哥在下面加了个2
 * 
 * @author lijianqun
 * 
 */
public class GuoJiGuoNeiZhuanZhenActivity2 extends BaseActivity implements OnItemClickListener {

	private Context context;
	private ListView mListView;
	private List<GuoJiGuoNeiZhuanZhenBean2> mList;
	private GuoJiGuoNeiZhuanZhenAdapter2 mAdapter;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentViewWithTitle(R.layout.activity_guojiguoneizhuanzhen2);
		context = this;
		initView();
		 initData();
		registerLintener();
	}

	private void initData() {
		mList = new ArrayList<GuoJiGuoNeiZhuanZhenBean2>();
		for (int i = 0; i < 10; i++) {
			mList.add(new GuoJiGuoNeiZhuanZhenBean2());
		}
		mAdapter = new GuoJiGuoNeiZhuanZhenAdapter2(context, mList);
		mListView.setAdapter(mAdapter);
	}

	private void initView() {
		mTitle.getTitle().setText("国际/国内转诊");
		mListView =(ListView) findViewById(R.id.lv_zhuanzhen2);
	}

	private void registerLintener() {
		mListView.setOnItemClickListener(this);
	}

	@Override
	public void onClick(View v) {
		super.onClick(v);
		switch (v.getId()) {
		}
	}

	@Override
	public void onItemClick(AdapterView<?> parent,View view,int position,long id) {
		Intent intent ;
		intent = new Intent(context, ZhuanJiaDetailsActivity.class);
		startActivity(intent);
	}

}
